Last Updated 10/31/2022

Sage Essentials
Section 4: Solving Equations

In this section you will learn how to apply solve command to find the exact solutions of equations (when this is possible). You may recall from Precalculus that we are not able in many cases to find exact solutions to equations and so we rely on numerical solvers to find approximate solutions. Later in this section you will use find_root and roots commands to find decimal approximations for solutions. The solution to linear systems of equations will also be discussed.

Entering and Manipulating Equations: The lhs and rhs commands

Example 1

Recall that we can give a name to an entire equation just as we have done for expressions. On the next line we enter the equation x 3 5 x 2 +23=2 x 2 +4x8 and give it the name "eqn1".

 

 

Note that “=” is the assignment operator and “==” is the logical equal operator.

 

We can isolate the left-hand and right-hand sides of the equation by using the lhs and rhs commands.

 

 

Use the lhs and rhs commands to find an equation that is equivalent to the original equation eqn1 but has zero on the right-hand side. Label the new equation eqn2.

 

Try this!

Enter the equation 4 x 2 11x+5= x 2 +5x . Isolate the left-hand and right-hand sides of the equation.

 


← Previous Example Next Example →